<nz-page-header nzTitle="商家管理">
    <nz-breadcrumb nz-page-header-breadcrumb [nzAutoGenerate]="true">
        <nz-breadcrumb-item>
            <a [routerLink]="['/']">首页</a>
        </nz-breadcrumb-item>
    </nz-breadcrumb>
</nz-page-header>

<nz-card [nzExtra]="extraAction">
    <ng-template #extraAction>
        <button nz-button (click)="create()" nzType="primary">{{'create' | translate}}</button>
        <button nz-button (click)="refresh()">{{'refresh' | translate}}</button>
    </ng-template>

    <nz-table #basicTable nzShowPagination [nzData]="dataItems">
        <thead>
            <tr>
                <!-- <th>Id</th> -->
                <th>图标</th>
                <th>cover</th>
                <th>名称</th>
                <th>简称</th>
                <th nzWidth="150px">介绍</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let item of basicTable.data">
                <!-- <td>{{item.id}}</td> -->
                <td>
                    <nz-avatar nzShape="square" [nzSize]="64" nzSize="large" nzIcon="user" [nzSrc]="item.logoImage">
                    </nz-avatar>
                </td>
                <td>
                    <nz-avatar nzShape="square" [nzSize]="128" nzSize="large" nzIcon="user" [nzSrc]="item.coverImage">
                    </nz-avatar>
                </td>
                <td>{{item.name}}</td>
                <td>{{item.shortName}}</td>
                <td>
                    <div [innerHTML]="item.description" style="max-height:150px; overflow-y: scroll;"></div>
                </td>
                <td>
                    <button nz-button nzType="primary" nzSize="small" (click)="edit(item)">{{'edit' | translate}}</button>
                    <nz-divider nzType="vertical"></nz-divider>
                    <button nz-button nzType="danger" nzSize="small" nz-popconfirm [nzPopconfirmTitle]="'确定删除吗?'" (nzOnConfirm)="delete(item)"
                        nzPopconfirmPlacement="top">{{'delete' | translate}}</button>
                </td>
            </tr>
        </tbody>
    </nz-table>
</nz-card>